package com.hd.pzhwlxt.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hd.pzhwlxt.mapper.VehicleInfoMapper;
import com.hd.pzhwlxt.pojo.VehicleInfo;
import com.hd.pzhwlxt.service.VehicleInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
@create: 2022-09-21 9:02
@author: 怀念天空
@Description: 
*/

@Service
public class VehicleInfoServiceImpl extends ServiceImpl<VehicleInfoMapper, VehicleInfo> implements VehicleInfoService{

    @Autowired
    private VehicleInfoMapper vehicleInfoMapper;
    @Override
    public List<VehicleInfo> getVehicleAndDriver() {
        return vehicleInfoMapper.getVehicleInfo();
    }

    @Override
    public Page<VehicleInfo> getVehicleAndDriverPage(Integer pageNum, Integer pageSize) {
        return vehicleInfoMapper.getVehicleAndDriverPage(new Page<>(pageNum,pageSize));
    }
}
